package com.walter.db.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 分类
 * </p>
 *
 * @author wuchenxi
 * @since 2020-12-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Category implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiParam(hidden = true)
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 分类名称
     */
    @NotEmpty(message = "分类名称不能为空！")
    @NotNull(message = "分类名称不能为空！")
    private String name;

    /**
     * 简介
     */
    @NotEmpty(message = "分类简介不能为空！")
    @NotNull(message = "分类简介不能为空！")
    private String content;

    private Date createTime;

    private Date updateTime;


}
